Improve quorum queue Ra system configurability (backport #15962)#15997
Merged
michaelklishin merged 2 commits intov4.3.xfrom Apr 10, 2026
Merged
Improve quorum queue Ra system configurability (backport #15962)#15997michaelklishin merged 2 commits intov4.3.xfrom
michaelklishin merged 2 commits intov4.3.xfrom
Conversation
Add support for configuring Ra's segment_max_size_bytes parameter via rabbitmq.conf as raft.segment_max_size_bytes. This allows operators to control the maximum size of Raft log segment files for quorum queues. The configuration: - Maps quorum_queue.segment_max_size_bytes in rabbitmq.conf to rabbit.quorum_segment_max_size_bytes in the application environment - Defaults to Ra's built-in default of 64 MB when not configured - Is explicitly applied to the quorum_queues Ra system configuration for transparency and maintainability Also add a macro QUORUM_DEFAULT_SEGMENT_MAX_SIZE_B to align with Ra's default value. (cherry picked from commit eacdd0c)
…urable Add support for configuring all quorum queue Ra system parameters via rabbitmq.conf using the quorum_queue.* namespace. This allows operators to fine-tune Raft log and WAL behavior specifically for quorum queues. New quorum_queue.* configuration options: - quorum_queue.wal_compute_checksums (default: true) - quorum_queue.segment_compute_checksums (default: true) - quorum_queue.max_append_entries_rpc_batch_size (default: 16) - quorum_queue.compress_mem_tables (default: true) - quorum_queue.segment_max_size_bytes (default: 64 MB) - quorum_queue.segment_max_entries (default: 4096) - quorum_queue.wal_max_size_bytes (default: 512 MB) - quorum_queue.wal_max_entries (default: 500,000) - quorum_queue.wal_max_batch_size (default: 4096) - quorum_queue.snapshot_chunk_size (default: 1 MB) Each quorum_queue.* setting has a fallback to the corresponding raft.* setting for backward compatibility with existing configurations. All configuration is mapped to rabbit application environment variables and explicitly applied to the quorum_queues Ra system during initialization, making the data flow transparent and maintainable. Add macros for all default values that match the RabbitMQ prelaunch defaults, centralizing configuration defaults in one place for easier maintenance. Simplify WalMaxEntries handling to use application:get_env with macro default instead of complex case statement checking DefaultConfig. (cherry picked from commit 42927f0)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make all quorum queue Ra configuration parameters explicit and configurable via
rabbitmq.conf.This PR expands on the initial work to make segment sizing configurable by exposing all quorum queue Ra system parameters through the
quorum_queue.*configuration namespace. This allows operators to fine-tune Raft log and WAL behavior specifically for quorum queues, with backward compatibility for the legacyraft.*configuration options.Motivation
Previously, quorum queue Ra system parameters could only be configured via the global
raft.*settings or the pre-launch default configuration. This PR provides dedicatedquorum_queue.*configuration options that:raft.*configurationsChanges
New
quorum_queue.*Configuration Optionsquorum_queue.segment_max_size_bytes(default: 64 MB)quorum_queue.segment_max_entries(default: 4096)quorum_queue.wal_max_size_bytes(default: 512 MB)quorum_queue.wal_max_entries(default: 500,000)quorum_queue.wal_max_batch_size(default: 4096)quorum_queue.wal_compute_checksums(default: true)quorum_queue.segment_compute_checksums(default: true)quorum_queue.max_append_entries_rpc_batch_size(default: 16)quorum_queue.compress_mem_tables(default: true)quorum_queue.snapshot_chunk_size(default: 1 MB)Implementation Details
quorum_queue.*setting that map to rabbit application environment variablesquorum_queue.*setting falls back to the correspondingraft.*setting if not explicitly configuredWalMaxEntrieshandling to useapplication:get_envwith macro defaults instead of complex case statement logicFiles Changed
deps/rabbit/src/rabbit_ra_systems.erl: Updated to read quorum_queue configuration and apply defaults via macrosdeps/rabbit/priv/schema/rabbit.schema: Added mappings and translations for all quorum_queue.* settingsdeps/rabbit/docs/rabbitmq.conf.example: Documented all new configuration optionsdeps/rabbit/test/config_schema_SUITE_data/rabbit.snippets: Added test coverage for all new settingsTest Plan
raft.*settingsNotes
rabbit_prelaunch_conf.erlThis is an automatic backport of pull request Improve quorum queue Ra system configurability #15962 done by Mergify.